load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "thrift-types",
    srcs = ["src/lib.rs"],
    autocargo = {"cargo_toml_config": {
        "lib": {"name": "thrift-types"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-thrift-types",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    named_deps = {
        "edenfs": "//eden/fs/service:thrift-rust",
        "edenfs_clients": "//eden/fs/service:thrift-rust-clients",
        "edenfs_config": "//eden/fs/config:config_thrift-rust",
        "fb303_core": "//fb303/thrift:fb303_core-rust",
        "hgclient_conf": "//configerator/structs/scm/hg/hgclientconf:config-rust",
    },
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        "//thrift/lib/rust:fbthrift",
    ],
)
